package com.dek.ssm.ch4;

import org.apache.ibatis.session.SqlSession;
import org.apache.log4j.Logger;

import com.dek.ssm.ch3.utils.SqlSessionFactoryUtils;
import com.dek.ssm.ch4.mapper.UserMapper;
import com.dek.ssm.ch4.pojo.User;

public class Ch4Main {
	
	private static Logger logger = Logger.getLogger(Ch4Main.class);
	
	public static void main(String[] args) {
		SqlSession session = SqlSessionFactoryUtils.openSqlSession();
		User user = session.getMapper(UserMapper.class).getUser(1L);
		logger.info(user.getSex().getName());
	}
}
